<script setup>
import { ref } from 'vue'
    
    const date = ref('')

    const dateChange = (val) => {
        console.log("dateChange:", val)
    }
</script>
<template>
    <p>import zhCn from 'element-plus/dist/locale/zh-cn.mjs' //导入 ElementPlus 组件库的中文语言包</p>
    <p> //app.use(ElementPlus) //将 ElementPlus 插件注册到 Vue 应用中s
        app.use(ElementPlus, {
            locale: zhCn // 设置 ElementPlus 组件库的区域语言为中文简体
        })</p>
    <hr/>
    <h3>日期</h3>
    <el-date-picker v-model="date" type="date" placeholder="请选择" />

    <h3>日期时间</h3>
    <el-date-picker v-model="date" type="datetime" placeholder="请选择" />

    <h3>事件绑定</h3>
    <el-date-picker v-model="date" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" @change="dateChange" />
</template>

<style scoped>

</style>